<template>
  <div>
    <el-dialog
  title="骑手详情"
  :visible.sync="dialogVisible"
  width="80%"
  :before-close="handleClose">
  <div class="onpen">
    <div class="heads">
        <div>
        <p style="font-weight: 600;">人员昵称:</p>
        <p style="margin-left: 10px;">{{ inststr.riderName }}</p>
        </div>
        <div>
        <p style="font-weight: 600;">联系方式:</p>
        <p style="margin-left: 10px;">{{ inststr.phone }}</p>
        </div>
        <div>
        <p style="font-weight: 600;">负责区域:</p>
        <p style="margin-left: 10px;">{{ inststr.area }}</p>
        </div>
    </div>
    <div class="onte">
      <el-radio-group v-model="tabPosition" @change="haleChange" style="margin-bottom: 30px">
        <el-radio-button label="onter2">订单记录</el-radio-button>
        <el-radio-button label="onter3">提现记录</el-radio-button>
      </el-radio-group>
    </div>
    
    <div class="onchel" v-if="tabPosition == 'onter2'"><Withdrawal  ref="Withdrawal"/></div>
    <div class="onchel" v-if="tabPosition == 'onter3'"><BarCounter /></div>
    <div style="height: 50px;"></div>
  </div>
</el-dialog>
  </div>
</template>

<script>
import Withdrawal from "./Withdrawal.vue";
import orderForm from "./orderForm.vue";
import BarCounter from "./BarCounter.vue";
export default {
    components: {
    Withdrawal,
    orderForm,
    BarCounter
  },
    data() {
        return {
            dialogVisible: false,
            tabPosition: "onter2",
            inststr:{},
        }
    },
  
    methods:{
      haleChange(){
        if(this.tabPosition=='onter2'){
          this.$refs.Withdrawal.apiGeyId(this.inststr)
        }
      },
        showModal(val){
          this.dialogVisible = true
          this.inststr=val
          setTimeout(() => {
          this.$refs.Withdrawal.apiGeyId(this.inststr)
            
          }, 100)
          

        },
        handleClose(){
            this.dialogVisible = false

        },
    }
}
</script>

<style lang="scss" scoped>
.heads{
    div{
        display: flex;
    }
}
::v-deep .el-dialog__body{
    padding: 10px 30px;
}
.onchel {
  width: 90%;
  margin-left: 2%;
}
.onte {
  padding: 20px 0 0 0px;
}
</style>